// 本地存储用户登录权证
const Info = 'zh_user_info'
// 设置本地存储的用户登录权证
export const setUserInfo = (obj) => {
  localStorage.setItem(Info, JSON.stringify(obj))
}

// 获取本地存储的用户登录权证
export const getUserInfo = () => {
  const temp = localStorage.getItem(Info)
  return temp ? JSON.parse(temp) : { token: '', userId: '' }
}

// 删除本地存储的用户登录权证
export const delUserInfo = () => {
  localStorage.removeItem(Info)
}
